#ifndef __tank_H__
#define __tank_H__
#include "cocos2d.h"
using namespace cocos2d;
class Tank :public CCSprite {
	// [Embed(source = '../assets/ice.png')] private starPNG:Class;
public:
    //float truespeed;
	float speed;// = 1;
	int life;// = 1;
	int theid;
	int dir;// = 1;
	int score;// = 0;
	int bulletSpeed;// = 6;
	CCPoint the;
	bool isMe;// = false;
	//ArrayList<CCSpriteFrame> fs;
    CCArray *fs;
	int frame;

	void destory() ;
    bool onice();
	void gotoAndStop(int i);

	bool tryMoveUp(float speed);
	bool tryMoveDown(float speed);

	bool tryMoveLeft(float speed) ;
	bool tryMoveRight(float speed);

	bool check(int row, int col);
	//CCPoint movePoint(Tank* tank);
	void shot();
	void bomb();

	bool checkHit();
	Tank(const char *filepath,float x,float y);
	void recttoids(CCRect r,std::vector<CCSprite *>);
};
#endif
